Proximity sensor with nonlinear filter and method

ABSTRACT

A sensor for a portable connected device comprising a filter  30  is arranged to reduce a noise component on a sampled input signal, wherein the filter is arranged to consider only input measurements that change systematically in a same direction, updating an output value when all the input samples in a predetermined time window are above or below a current output value and, repeating the current output value when the input samples in the time window are below and above the current output value.

REFERENCE DATA

The present application claims benefit of prior date of U.S. provisionalpatent application 62/511,576 of May 26, 2017, of European PatentApplication EP17171258.1 of May 16, 2017, and of European PatentApplication EP17170848.0 of May 12, 2017, all in the name of SemtechCorporation. Those applications are hereby incorporated by reference.

FIELD OF THE INVENTION

The present invention concerns a processor for processing the output ofa proximity sensor, and to a smart proximity sensor that is combinedwith a processor that is arranged to output a signal that discriminatesbetween the proximity to a human body and the proximity to an inanimateobject. The present invention is concerned in particular, but notexclusively, with a connected portable device that is equipped with sucha smart proximity sensor and is arranged to adapt the RF emitted from aradio interface in order to maintain a Specific Absorption Rate (SAR)within given limits.

DESCRIPTION OF RELATED ART

Capacitive proximity detectors are used in many modern portable devices,including mobile phones and tablets, to determine whether the device isclose to a body part of a user. This information is important in severalways: it is used to detect whether the telephone is being activelymanipulated by a user, and whether the user is looking at the display,in which case the information displayed can be adapted, and/or thedevice switch from a low power state to an active one. Importantly, thisinformation is used to adapt the power level of the radio transmitter tocomply with statutory SAR limits. Capacitive proximity detection is usedalso in touch-sensitive displays and panels.

Known capacitive sensing systems measure the capacity of an electrodeand, when the device is placed in proximity of the human body (forexample the hand, the head, or the lap) detect an increase in capacity.The variations in the sensor's capacity are relatively modest, and oftenamount to some percent of the “background” capacity seen by the sensorwhen no conductive body is in the proximity. Known capacitive detectionsystems may include a digital processor for subtracting drift and noisecontributions and deliver a digital value of the net user's capacity inreal time and/or a digital binary flag indicating the proximity statusbased on a programmable threshold.

BRIEF SUMMARY OF THE INVENTION

It is therefore an aim of the present invention to provide adiscrimination method for inanimate object in a capacitive proximitydetector that overcomes the above limitation.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be better understood with the aid of the descriptionof an embodiment given by way of example and illustrated by the figures,in which:

FIG. 1 illustrates schematically a capacitive proximity sensor in aportable connected device;

The flowchart of FIG. 2 describes a nonlinear filtering method;

FIG. 3 plots a noisy signal processed by a running average filter and bya nonlinear filter;

FIG. 4 plots the standard deviation in relation to the filter windowsize;

FIG. 5 is a flowchart describing an optional baseline estimation method;

FIG. 6 illustrates an optional multiple-threshold discrimination method;

DETAILED DESCRIPTION OF POSSIBLE EMBODIMENTS OF THE INVENTION

FIG. 1 shows schematically a capacitive proximity detector in aconnected portable device such as a portable phone, laptop computer, ortablet, but it should be understood that the filter and the method ofthe invention could be applied to diverse fields.

The detector is sensitive to the capacity Cx of an electrode 20 thatwill increase slightly at the approach of a user's hand, face or body.The variations due to body proximity are overshadowed by the owncapacity of the electrode 20 which, in turn, is not stable. The capacitysignal is preferably amplified and processed by an analogue processor23, which may also subtract a programmable offset, and converted intoraw digital values by an A/D converter 25. The samples R(n) may beencoded as 16 bits integers, or in any other suitable format.

The raw samples R(n) contain also, in anon-ideal world, noise andunwanted disturbances that are attenuated by a filter 30. The filter 30which will be described more in detail in the following, provides aseries of samples U(n) useful for the processing in the successivestages.

The unit 60 is a baseline estimator that generates a series of samplesA(n) that approximate the instantaneous value of the baseline,considering drift. This is then subtracted from the U(n) samples indifference unit 40 and provides the drift-corrected samples D(n). Adiscriminator unit 50 then generates a binary value ‘PROX’ thatindicates the proximity of the user's hand, face, or body. The inventionis not limited to a binary output, however, and encompasses detectorsthat generate multi-bit proximity values as well.

In an optional variant of the invention, the baseline estimator 60includes a drift compensation unit arranged to track and subtract adrift from the proximity signal generating a drift-compensated signalby: measuring a variation of the proximity signal in a determined timeinterval, freezing the tracking of the drift when the logical PROX valueis asserted and the variation is not in a predetermined acceptanceregion, or the variation is in a predetermined freezing region, asrepresented in FIG. 5.

An important aspect of the method of the invention is (step 120) theestimation of the variation of the useful signal U_(n). The variation isrepresented by a quantity Δ_(var) that is preferably computed at eachnew useful sample U_(n) (step 105). A possible manner of estimating thevariation of U_(n) is the difference between a sample and the precedingone, Δ_var=U_(n)−U_(n-1) or preferably, a running average of thedifferences U_(n)−U_(n-1) in a suitable window, for example the lasteight received samples of U_(n). Δ_(var), however, could denote anyother suitable estimator of the variation.

At step 122 the method of the invention checks whether the proximitysignal is active, i.e. whether there are indications that a conductivebody is nearby. If the result of this test is positive, the method tests(step 130) whether the variation Δ_(var) is in a predetermined region ofacceptation. In the example, Δ_(var) is compared with a lower thresholdt⁽⁻⁾, which may be negative, and an upper threshold t₍₊₎ that will be,in most cases, positive.

If the variation is in the region of acceptation, the method of theinvention treats it as a drift, and updates the baseline estimation totrack it (step 160). The new value for A_(n) could be computed by addingto the previous one the value of the variation Δ_(var), or in any othermanner.

If, on the other hand, the variation Δ_(var) is not in the predeterminedregion of acceptation (t⁽⁻⁾, t₍₊₎) the method of the invention treats itas a movement of the phone and/or of the user and not as a drift. Instep 140, the previous value of the baseline estimation, A_(n-1) iscopied into the new one A_(n). In this manner, the baseline estimationA_(n) is frozen to a constant value.

Optionally, as shown in this example, the baseline estimation A_(n) canbe frozen based on the variation Δ_(var) also when the proximity signalis not active. This is the case of the example shown where, at step 135,the variation Δ_(var) is compared with another threshold valuet_(inact). If the variation exceeds this value, the baseline estimationis frozen (step 140), otherwise the value of A_(n) is updated based onthe samples (U_(n), U_(n-1), . . . ) in any suitable manner (step 148).In a possible implementation, A_(n) may be set equal to U_(n-1), or toan average of past U_(n) samples.

Optional steps 170 and 180 prevent that the value A_(n) exceeds that ofU_(n), thereby ensuring D_(n)>0.

Should the capacitive proximity sensor be part of a connected portabledevice for SAR control, the sensor electrode 20 will preferably beplaced close to the transmitting antenna of the RF transmitter, todetermine accurately the distance from the radio source. The sensorelectrode 20 could be realized by a conductor on a printed circuit boardor on a flexible circuit board, and may have guard electrodes on theback and at the sides, to suppress detection of bodies and objects atthe back or on the sides of the device.

In the same application, the capacitive electrode 20 could serve also asRF antenna, or part thereof. FIG. 1 shows this feature of the invention.The electrode 20 is connected, through a decoupling capacitor Cd, to aradio transmitter and receiver unit 90, and has an inductor Ld, oranother RF-blocking element, to block the radiofrequency signal.Otherwise, the radio unit 90 could be connected to an antenna separateand independent from the sense electrode 20 which, in this case, couldbe connected directly to the analogue interface 23 without thedecoupling inductor Ld.

FIG. 6 illustrates another optional variant of the invention, in whichthe capacitance may be detected as a function of time when the detectorapproaches a body (peak 630) and then an inanimate object (peak 650). Inthe discriminator 50 the capacity signal is compared with four thresholdvalues: t_(p) is the lowest and corresponds to a value that, when it isnot exceeded indicates sufficient distance from any body part that thetransmitter can operate at full RF power. The highest threshold t_(b)indicates, when it is surpassed, that the antenna is very likely closeto a body part, and the power must be reduced. The intermediatethresholds t_(tl) and t_(th) delimit a band of values that may beproduced either by a body part or an inanimate object and, in this band,a decision is taken based on the variation of the signal. According toan aspect of the invention, when the capacity is comprised betweent_(tl) and t_(th) the discriminator unit checks the variation of thecapacity over time and determines whether the capacitance signal isstable. Stability can be judged for example by verifying that themaximum and minimum of the signal within a determined time window arenot more separate than a given value, or in any other suitable way.

The detector of the invention may generate the following logical signalsconventionally denoted by PROX, BODY, and OBJECT:

-   -   PROX, set when C>t_(p) This correspond to the logical flag        generated when the discriminator unit 50 of FIG. 2 is a        conventional discriminator;    -   BODY, set when C>t_(b).    -   OBJECT, set when t_(tl)<C<t_(th) and C is stable.

The power of the RF transmitter is determined in consideration of theseflags and, in particular, the flag TABLE is used as an indicator thatthe object that has raised the capacity is inanimate, and the power neednot be reduced. In a possible implementation, if the trigger levelst_(p), t_(b), t_(l), t_(h) are in the order represented in FIG. 6, theRF power level could be given by the following table that covers all thepossible combinations of PROX, OBJECT, and BODY.

TABLE 1 PROX OBJECT BODY RF Power 0 0 0 FULL (no object detected) 1 0 0REDUCED (unknown type => could be user) 1 0 1 REDUCED (user detected) 11 0 FULL (inanimate object detected)

Preferably, the filter 30 implements a non-linear noise suppressionalgorithm that will now be described with reference to FIG. 2. The entrypoint 305 is executed on all the raw samples R(k) generated by the ADC25. The filter unit, which may include hardwired logic blocks,programmed logic, or any combination thereof.

The filter 30 is arranged to consider only the raw measurements R(k)that go systematically in the same direction, updating the output valueU(k) when all the input samples R(k) in a predetermined time window areabove or below the current output value U(k−1). If, on the other hand,the input values R(k) in the same time window are below and aboveU(k−1), the output value is not changed.

In a possible implementation, represented by the flowchart of FIG. 2,the filter 30 computes and maintains two variables min(k) and max(k)that are the minimum and maximum values of R(k) in a window of Npreceding samples (step 320)

${\min(k)} = {\min\limits_{{i = 0},\ldots\mspace{14mu},{N - 1}}{R\left( {k - 1} \right)}}$${\max(k)} = {\max\limits_{{i = 0},\ldots\mspace{14mu},{N - 1}}{R\left( {k - 1} \right)}}$where N is a selectable parameter that loosely determines the width ofthe filtering window. N could be comprised between 4 and 20, in typicalimplementations. Simulations with N=8 have provided satisfactory resultsboth in noise reduction and sensitivity to small distance changes. N maybe a predetermined value hardwired in the filter, a programmablequantity settable by a host system, or a dynamic value.

In steps 350 and 370, the values of min(k) and max(k) are compared withthe last determination of the filter's output U(k−1) and, if it is foundthat U(k−1) is lower than the minimum value, or greater that the maximumvalue in the windowed samples R(k), . . . , R(k−N+1), the new value ofU(k) is set to that minimum (step 362), respectively maximum (step 364).If neither of steps 350 and 370 is satisfied, the values R(k), . . . ,R(k−N+1) are in part above and in part below U(k−1) and the output isnot changed from the previous value (step 366). The cycle then repeatswhen a new successive value of R(k) is produced (step 305). The informedreader will appreciate that the initial value of U is not determined bythese recursive steps, but can be generated in many ways when the filteris initialized, for example by setting U(0) equal to R(0), to a randomvalue, or simply to zero.

FIG. 3 represents a simulation of the nonlinear filter of the invention.The line 145 is a plot of a simulated signal (a rectangular pulse) witha substantial amount of white noise superimposed. Line 149 plots thesame signal after processing with a linear filter: a running averagefilter with window length N=8. Line 147, finally, shows the output ofthe filter of the invention also with a window length N=8. It will beappreciated that both the linear filter and that of the invention makethe signal stand out of the noise, but the variability of the signal 147is considerably lower than that of the linear filter 149.

This can be explained recalling that the standard deviation of theoutput of a linear filter decreases only with the square root of thewindow length (or pass bandwidth). The filter of the invention isarranged to strongly reduce the probability of output changes due tostatistic fluctuations. Taking for example that a input R consisting ofa constant value with superimposed noise, and supposing that a giveninstant the output U(k−1) is perfectly centred on the noise free valueof R, then the successive output value U(k) will change only if Nconsecutive input samples lay on the same side of the central value; theprobability of change is then (½)^(N-1).

A peculiarity of the filter of the invention is that small transitorychanges could produce no effect on the output, while output of a linearfilter would have changed, however little. This may be regarded adrawback in some applications, although the output of the linear filter,consisting of a tiny signal overwhelmed by noise, may not be useful inpractice.

An advantage of the filter of the invention is that it provides a strongreduction of the noise fluctuations in a simple algorithm. When thefilter is applied to the proximity detector of FIG. 1, it is relativelysimple finding a threshold value for the discriminator 50 that providesa reliable proximity trigger, with a minimum of false signals. Thiswould be harder with a simple average. A linear average filter should,to achieve the same result, increase N and lengthen the extension of thewindow. This measure, however, would increase the computational burden,and reduce the bandwidth, hence the sensitivity to fast transients.

In the frame of the proximity detector of FIG. 1, the nonlinearfiltering processor of the invention could replace totally the low passfilter block 30 or be used in combination with a linear digital filter,before or after. It could be inserted ahead of the baseline correctionunit 40, 60, as represented, or also after.

FIG. 4 plots the noise reduction versus the number of samples, assuminginput R consisting of a constant value with superimposed noise. Thenoise is plotted as the standard deviation of the output signal. Theaddressee will appreciate that, in the nonlinear filter of the invention430, a decreases faster than in the average filter 410, which follows a1/√{square root over (N)} law.

The filter of the invention is capable of several improvements andadaptations. For example, in a variant, the U(n) may be changed notexactly to max(k), respectively min(k), but shifted towards the extremevalue by a predefined fractional amount. For example, the updates insteps 362 and 362 could be replaced by:U(k)=a·min(k)+(1−a)·U(k−1)U(k)=a·max(k)+(1−a)U(k−1)where a denotes a predefined coefficient between 0 and 1.

According to another variant, the filter could compare the averagechange in the input signal with an expected spread of the measurement,and update the output value only when the average change is larger thana predetermined fraction of the expected spread, thus significant.

REFERENCE NUMBERS USED IN THE FIGURES

-   20 electrode-   23 analogue processor-   25 A/D converter-   30 filter-   40 difference-   50 discriminator-   60 baseline estimator-   90 receiver-   105 new sample U(n)-   120 estimation of the variation-   122 test if proximity-   130 test variation against lower and upper thresholds-   135 test against inactive threshold-   140 freeze variation-   145 simulated signal-   147 filter output-   149 output of the linear filter-   160 update baseline estimation-   170 test A(n) against U(n)-   180 cap A(n)-   305 new R(x) value-   320 compute and maintain max and min value-   350 test filter output against min(k)-   362 set to minimum-   364 set to maximum-   366 copy previous value-   370 test filter output against max(k)-   410 standard deviation of an averager-   430 standard deviation of the invention's filter-   630 approach of a body-   650 approach of an inanimate object

The invention claimed is:
 1. A sensor for a portable connected device comprising a filter is arranged to reduce a noise component on a sampled input signal, wherein the filter is arranged to consider only input measurements that change systematically in a same direction, updating an output value when all the input samples in a predetermined time window are above or below a current output value and, repeating the current output value when the input samples in the time window are below and above the current output value.
 2. The sensor of claim 1 wherein the filter is arranged to set the output value to the minimum or to the maximum of the input samples in the time window when all the input samples in the time window are below, respectively above the current output value.
 3. The sensor of claim 1, wherein the filter is arranged to shift the output value towards the minimum or the maximum of the input samples in the time window when all the input samples in the time window are below, respectively above the current output value.
 4. The sensor of claim 1, the filter being arranged to compare the average change in the input signal with an expected spread of the measurement, and update the output value only when the average change is larger than a predetermined fraction of the expected spread.
 5. The sensor of claim 1, comprising a linear low-pass filter.
 6. The sensor of claim 1, comprising a baseline correction unit and a discriminator.
 7. The sensor of claim 1 being a capacitive proximity sensor arranged to determine whether a user is in proximity to the portable connected device based on a capacity seen by a sense electrode.
 8. A portable connected device comprising capacitive proximity sensor arranged to determine whether a user is in proximity to the portable connected device based on a capacity seen by a sense electrode, comprising a filter is arranged to reduce a noise component on a sampled input signal, wherein the filter is arranged to consider only input measurements that change systematically in a same direction, updating an output value when all the input samples in a predetermined time window are above or below a current output value and, repeating the current output value when the input samples in the time window are below and above the current output value, the connected device being operatively arranged to adapt a RF power of a radio transmitter based on the proximity of a user to the portable connected device.
 9. The portable connected device of claim 8, wherein the sense electrode is also an emitter of radio waves. 